import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home/Home.vue'
import Mine from './views/Mine/Mine.vue'
import Order from './views/Order/Order.vue'
import Allorder from './views/Order/components/Allorder.vue'
import Payment from './views/Order/components/Payment.vue'
import Use from './views/Order/components/Use.vue'
import Evaluation from './views/Order/components/Evaluation.vue'
import Aftersales from './views/Order/components/Aftersales.vue'
import City from './views/City/City.vue'
import Login from './views/Mine/components/Login.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '*',
      redirect:'/'
    },
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/mine',
      name: 'mine',
      component: Mine
    },
      {
      path: '/order',
      component:Order,
      children:[
            {
            component: Allorder,
            path:'/order/allorder'
            },
            {
            path:'/order/payment',
            component:Payment
            },
            {
            path:'/order/use',
            component:Use
            },
            {
            path:'/order/evaluation',
            component:Evaluation
            },
            {
            path:'/order/aftersales',
            component:Aftersales
            }
       ]
      },{     
        path: '/city',
        name: 'city',
        component: City
      },
      {
      path:'/mine/login',
      component:Login
      }
  ],
  linkActiveClass:'van-tabbar-item--active'
})
